package cn.iocoder.yudao.module.wine.controller.app.supplyorderitem;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.wine.controller.app.supplyorderitem.vo.AppSupplyOrderItemRespVO;
import cn.iocoder.yudao.module.wine.service.supplyorderitem.SupplyOrderItemService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name = "App 用户 - 订单项信息")
@RestController
@RequestMapping("/wine/supply-order-item")
@Validated
public class AppSupplyOrderItemController {

    @Resource
    private SupplyOrderItemService supplyOrderItemService;


    @GetMapping("/list")
    @Operation(summary = "获得订单项信息列表")
    public CommonResult<List<AppSupplyOrderItemRespVO>> getSupplyOrderItemList(@RequestParam("orderId") Long orderId) {
        List<AppSupplyOrderItemRespVO> list = supplyOrderItemService.getSupplyOrderItemList(orderId);
        return success(list);
    }



}
